package xyz.zhouzhaodong.crm.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import xyz.zhouzhaodong.crm.dto.DepartmentDto;
import xyz.zhouzhaodong.crm.entity.Department;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import xyz.zhouzhaodong.crm.entity.Department;

import java.util.List;

/**
 * <p>
 * 部门表 Mapper 接口
 * </p>
 *
 * @author zhouzhaodong
 * @since 2020-06-10
 */
public interface DepartmentMapper extends BaseMapper<Department> {

    /**
     * 根据id更新部门信息
     * @param departmentDto
     */
    void updateDepartment(@Param("departmentDto") DepartmentDto departmentDto);

    /**
     * 分页查询部门信息
     * @param departmentDto
     * @param page
     * @return
     */
    IPage<Department> selectDepartmentList(@Param("departmentDto") DepartmentDto departmentDto, Page<Department> page);

    /**
     * 不分页查询部门信息
     * @param departmentDto
     * @return
     */
    List<Department> selectDepartmentList(@Param("departmentDto") DepartmentDto departmentDto);
    
}
